l3lab/ntp-mathlib huggingface dataset:
theorem add_eq_two_iff {n m : WithBot ℕ} :
    n + m = 2 ↔ n = 0 ∧ m = 2 ∨ n = 1 ∧ m = 1 ∨ n = 2 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals 

Proof state:
case some.none
val✝ : ℕ
⊢ some val✝ + none = 2 ↔ some val✝ = 0 ∧ none = 2 ∨ some val✝ = 1 ∧ none = 1 ∨ some val✝ = 2 ∧ none = 0

Next tactic:
refine' ⟨fun h => Option.noConfusion h, fun h => _⟩
theorem add_eq_two_iff {n m : WithBot ℕ} :
    n + m = 2 ↔ n = 0 ∧ m = 2 ∨ n = 1 ∧ m = 1 ∨ n = 2 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              

Proof state:
case some.none
val✝ : ℕ
h : some val✝ = 0 ∧ none = 2 ∨ some val✝ = 1 ∧ none = 1 ∨ some val✝ = 2 ∧ none = 0
⊢ some val✝ + none = 2

Next tactic:
aesop (simp_options := { decide := true })
theorem add_eq_two_iff {n m : WithBot ℕ} :
    n + m = 2 ↔ n = 0 ∧ m = 2 ∨ n = 1 ∧ m = 1 ∨ n = 2 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals 

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ some val✝¹ + some val✝ = 2 ↔
    some val✝¹ = 0 ∧ some val✝ = 2 ∨ some val✝¹ = 1 ∧ some val✝ = 1 ∨ some val✝¹ = 2 ∧ some val✝ = 0

Next tactic:
refine' ⟨fun h => Option.noConfusion h, fun h => _⟩
theorem add_eq_two_iff {n m : WithBot ℕ} :
    n + m = 2 ↔ n = 0 ∧ m = 2 ∨ n = 1 ∧ m = 1 ∨ n = 2 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ some val✝¹ + some val✝ = 2 ↔
    some val✝¹ = 0 ∧ some val✝ = 2 ∨ some val✝¹ = 1 ∧ some val✝ = 1 ∨ some val✝¹ = 2 ∧ some val✝ = 0

Next tactic:
repeat' erw [WithBot.coe_eq_coe]
theorem add_eq_two_iff {n m : WithBot ℕ} :
    n + m = 2 ↔ n = 0 ∧ m = 2 ∨ n = 1 ∧ m = 1 ∨ n = 2 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  repeat' 

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ some val✝¹ + some val✝ = 2 ↔
    some val✝¹ = 0 ∧ some val✝ = 2 ∨ some val✝¹ = 1 ∧ some val✝ = 1 ∨ some val✝¹ = 2 ∧ some val✝ = 0

Next tactic:
erw [WithBot.coe_eq_coe]
theorem add_eq_two_iff {n m : WithBot ℕ} :
    n + m = 2 ↔ n = 0 ∧ m = 2 ∨ n = 1 ∧ m = 1 ∨ n = 2 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  repeat' 

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑2 ↔
    some val✝¹ = 0 ∧ some val✝ = 2 ∨ some val✝¹ = 1 ∧ some val✝ = 1 ∨ some val✝¹ = 2 ∧ some val✝ = 0

Next tactic:
erw [WithBot.coe_eq_coe]
theorem add_eq_two_iff {n m : WithBot ℕ} :
    n + m = 2 ↔ n = 0 ∧ m = 2 ∨ n = 1 ∧ m = 1 ∨ n = 2 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  repeat' 

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑2 ↔
    val✝¹ = 0 ∧ some val✝ = 2 ∨ some val✝¹ = 1 ∧ some val✝ = 1 ∨ some val✝¹ = 2 ∧ some val✝ = 0

Next tactic:
erw [WithBot.coe_eq_coe]
theorem add_eq_two_iff {n m : WithBot ℕ} :
    n + m = 2 ↔ n = 0 ∧ m = 2 ∨ n = 1 ∧ m = 1 ∨ n = 2 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  repeat' 

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑2 ↔
    val✝¹ = 0 ∧ val✝ = ↑2 ∨ some val✝¹ = 1 ∧ some val✝ = 1 ∨ some val✝¹ = 2 ∧ some val✝ = 0

Next tactic:
erw [WithBot.coe_eq_coe]
theorem add_eq_two_iff {n m : WithBot ℕ} :
    n + m = 2 ↔ n = 0 ∧ m = 2 ∨ n = 1 ∧ m = 1 ∨ n = 2 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  repeat' 

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑2 ↔
    val✝¹ = 0 ∧ val✝ = ↑2 ∨ val✝¹ = 1 ∧ some val✝ = 1 ∨ some val✝¹ = 2 ∧ some val✝ = 0

Next tactic:
erw [WithBot.coe_eq_coe]
theorem add_eq_two_iff {n m : WithBot ℕ} :
    n + m = 2 ↔ n = 0 ∧ m = 2 ∨ n = 1 ∧ m = 1 ∨ n = 2 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  repeat' 

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑2 ↔ val✝¹ = 0 ∧ val✝ = ↑2 ∨ val✝¹ = 1 ∧ val✝ = 1 ∨ some val✝¹ = 2 ∧ some val✝ = 0

Next tactic:
erw [WithBot.coe_eq_coe]
theorem add_eq_two_iff {n m : WithBot ℕ} :
    n + m = 2 ↔ n = 0 ∧ m = 2 ∨ n = 1 ∧ m = 1 ∨ n = 2 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  repeat' 

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑2 ↔ val✝¹ = 0 ∧ val✝ = ↑2 ∨ val✝¹ = 1 ∧ val✝ = 1 ∨ val✝¹ = ↑2 ∧ some val✝ = 0

Next tactic:
erw [WithBot.coe_eq_coe]
theorem add_eq_two_iff {n m : WithBot ℕ} :
    n + m = 2 ↔ n = 0 ∧ m = 2 ∨ n = 1 ∧ m = 1 ∨ n = 2 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  repeat' 

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑2 ↔ val✝¹ = 0 ∧ val✝ = ↑2 ∨ val✝¹ = 1 ∧ val✝ = 1 ∨ val✝¹ = ↑2 ∧ val✝ = 0

Next tactic:
erw [WithBot.coe_eq_coe]
theorem add_eq_two_iff {n m : WithBot ℕ} :
    n + m = 2 ↔ n = 0 ∧ m = 2 ∨ n = 1 ∧ m = 1 ∨ n = 2 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  repeat' erw [WithBot.coe_eq_coe]
  

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑2 ↔ val✝¹ = 0 ∧ val✝ = ↑2 ∨ val✝¹ = 1 ∧ val✝ = 1 ∨ val✝¹ = ↑2 ∧ val✝ = 0

Next tactic:
exact Nat.add_eq_two_iff
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  

Proof state:
n m : WithBot ℕ
⊢ n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0

Next tactic:
rcases n, m with ⟨_ | _, _ | _⟩
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  

Proof state:
case none.none
⊢ none + none = 3 ↔ none = 0 ∧ none = 3 ∨ none = 1 ∧ none = 2 ∨ none = 2 ∧ none = 1 ∨ none = 3 ∧ none = 0
case none.some
val✝ : ℕ
⊢ none + some val✝ = 3 ↔
    none = 0 ∧ some val✝ = 3 ∨ none = 1 ∧ some val✝ = 2 ∨ none = 2 ∧ some val✝ = 1 ∨ none = 3 ∧ some val✝ = 0
case some.none
val✝ : ℕ
⊢ some val✝ + none = 3 ↔
    some val✝ = 0 ∧ none = 3 ∨ some val✝ = 1 ∧ none = 2 ∨ some val✝ = 2 ∧ none = 1 ∨ some val✝ = 3 ∧ none = 0
case some.some
val✝¹ val✝ : ℕ
⊢ some val✝¹ + some val✝ = 3 ↔
    some val✝¹ = 0 ∧ some val✝ = 3 ∨
      some val✝¹ = 1 ∧ some val✝ = 2 ∨ some val✝¹ = 2 ∧ some val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0

Next tactic:
any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals 

Proof state:
case none.none
⊢ none + none = 3 ↔ none = 0 ∧ none = 3 ∨ none = 1 ∧ none = 2 ∨ none = 2 ∧ none = 1 ∨ none = 3 ∧ none = 0

Next tactic:
refine' ⟨fun h => Option.noConfusion h, fun h => _⟩
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              

Proof state:
case none.none
h : none = 0 ∧ none = 3 ∨ none = 1 ∧ none = 2 ∨ none = 2 ∧ none = 1 ∨ none = 3 ∧ none = 0
⊢ none + none = 3

Next tactic:
aesop (simp_options := { decide := true })
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals 

Proof state:
case none.some
val✝ : ℕ
⊢ none + some val✝ = 3 ↔
    none = 0 ∧ some val✝ = 3 ∨ none = 1 ∧ some val✝ = 2 ∨ none = 2 ∧ some val✝ = 1 ∨ none = 3 ∧ some val✝ = 0

Next tactic:
refine' ⟨fun h => Option.noConfusion h, fun h => _⟩
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              

Proof state:
case none.some
val✝ : ℕ
h : none = 0 ∧ some val✝ = 3 ∨ none = 1 ∧ some val✝ = 2 ∨ none = 2 ∧ some val✝ = 1 ∨ none = 3 ∧ some val✝ = 0
⊢ none + some val✝ = 3

Next tactic:
aesop (simp_options := { decide := true })
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals 

Proof state:
case some.none
val✝ : ℕ
⊢ some val✝ + none = 3 ↔
    some val✝ = 0 ∧ none = 3 ∨ some val✝ = 1 ∧ none = 2 ∨ some val✝ = 2 ∧ none = 1 ∨ some val✝ = 3 ∧ none = 0

Next tactic:
refine' ⟨fun h => Option.noConfusion h, fun h => _⟩
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              

Proof state:
case some.none
val✝ : ℕ
h : some val✝ = 0 ∧ none = 3 ∨ some val✝ = 1 ∧ none = 2 ∨ some val✝ = 2 ∧ none = 1 ∨ some val✝ = 3 ∧ none = 0
⊢ some val✝ + none = 3

Next tactic:
aesop (simp_options := { decide := true })
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals 

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ some val✝¹ + some val✝ = 3 ↔
    some val✝¹ = 0 ∧ some val✝ = 3 ∨
      some val✝¹ = 1 ∧ some val✝ = 2 ∨ some val✝¹ = 2 ∧ some val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0

Next tactic:
refine' ⟨fun h => Option.noConfusion h, fun h => _⟩
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ some val✝¹ + some val✝ = 3 ↔
    some val✝¹ = 0 ∧ some val✝ = 3 ∨
      some val✝¹ = 1 ∧ some val✝ = 2 ∨ some val✝¹ = 2 ∧ some val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0

Next tactic:
repeat' erw [WithBot.coe_eq_coe]
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  repeat' 

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ some val✝¹ + some val✝ = 3 ↔
    some val✝¹ = 0 ∧ some val✝ = 3 ∨
      some val✝¹ = 1 ∧ some val✝ = 2 ∨ some val✝¹ = 2 ∧ some val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0

Next tactic:
erw [WithBot.coe_eq_coe]
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  repeat' 

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑3 ↔
    some val✝¹ = 0 ∧ some val✝ = 3 ∨
      some val✝¹ = 1 ∧ some val✝ = 2 ∨ some val✝¹ = 2 ∧ some val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0

Next tactic:
erw [WithBot.coe_eq_coe]
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  repeat' 

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑3 ↔
    val✝¹ = 0 ∧ some val✝ = 3 ∨
      some val✝¹ = 1 ∧ some val✝ = 2 ∨ some val✝¹ = 2 ∧ some val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0

Next tactic:
erw [WithBot.coe_eq_coe]
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  repeat' 

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑3 ↔
    val✝¹ = 0 ∧ val✝ = ↑3 ∨
      some val✝¹ = 1 ∧ some val✝ = 2 ∨ some val✝¹ = 2 ∧ some val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0

Next tactic:
erw [WithBot.coe_eq_coe]
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  repeat' 

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑3 ↔
    val✝¹ = 0 ∧ val✝ = ↑3 ∨ val✝¹ = 1 ∧ some val✝ = 2 ∨ some val✝¹ = 2 ∧ some val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0

Next tactic:
erw [WithBot.coe_eq_coe]
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  repeat' 

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑3 ↔
    val✝¹ = 0 ∧ val✝ = ↑3 ∨ val✝¹ = 1 ∧ val✝ = ↑2 ∨ some val✝¹ = 2 ∧ some val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0

Next tactic:
erw [WithBot.coe_eq_coe]
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  repeat' 

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑3 ↔
    val✝¹ = 0 ∧ val✝ = ↑3 ∨ val✝¹ = 1 ∧ val✝ = ↑2 ∨ val✝¹ = ↑2 ∧ some val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0

Next tactic:
erw [WithBot.coe_eq_coe]
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  repeat' 

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑3 ↔
    val✝¹ = 0 ∧ val✝ = ↑3 ∨ val✝¹ = 1 ∧ val✝ = ↑2 ∨ val✝¹ = ↑2 ∧ val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0

Next tactic:
erw [WithBot.coe_eq_coe]
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  repeat' 

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑3 ↔
    val✝¹ = 0 ∧ val✝ = ↑3 ∨ val✝¹ = 1 ∧ val✝ = ↑2 ∨ val✝¹ = ↑2 ∧ val✝ = 1 ∨ val✝¹ = ↑3 ∧ some val✝ = 0

Next tactic:
erw [WithBot.coe_eq_coe]
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  repeat' 

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑3 ↔
    val✝¹ = 0 ∧ val✝ = ↑3 ∨ val✝¹ = 1 ∧ val✝ = ↑2 ∨ val✝¹ = ↑2 ∧ val✝ = 1 ∨ val✝¹ = ↑3 ∧ val✝ = 0

Next tactic:
erw [WithBot.coe_eq_coe]
theorem add_eq_three_iff {n m : WithBot ℕ} :
    n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by
  rcases n, m with ⟨_ | _, _ | _⟩
  any_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩;
              aesop (simp_options := { decide := true })
  repeat' erw [WithBot.coe_eq_coe]
  

Proof state:
case some.some
val✝¹ val✝ : ℕ
⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑3 ↔
    val✝¹ = 0 ∧ val✝ = ↑3 ∨ val✝¹ = 1 ∧ val✝ = ↑2 ∨ val✝¹ = ↑2 ∧ val✝ = 1 ∨ val✝¹ = ↑3 ∧ val✝ = 0

Next tactic:
exact Nat.add_eq_three_iff
theorem coe_nonneg {n : ℕ} : 0 ≤ (n : WithBot ℕ) := by
  

Proof state:
n : ℕ
⊢ 0 ≤ ↑n

Next tactic:
rw [← WithBot.coe_zero]
theorem coe_nonneg {n : ℕ} : 0 ≤ (n : WithBot ℕ) := by
  rw [← WithBot.coe_zero]
  

Proof state:
n : ℕ
⊢ ↑0 ≤ ↑n

Next tactic:
exact WithBot.coe_le_coe.mpr (Nat.zero_le n)
@[simp]
theorem lt_zero_iff (n : WithBot ℕ) : n < 0 ↔ n = ⊥ := by
 

Proof state:
n : WithBot ℕ
⊢ n < 0 ↔ n = ⊥

Next tactic:
refine' Option.casesOn n _ _
@[simp]
theorem lt_zero_iff (n : WithBot ℕ) : n < 0 ↔ n = ⊥ := by
 refine' Option.casesOn n _ _
 

Proof state:
case refine'_1
n : WithBot ℕ
⊢ none < 0 ↔ none = ⊥
case refine'_2 n : WithBot ℕ ⊢ ∀ (val : ℕ), some val < 0 ↔ some val = ⊥

Next tactic:
exact of_eq_true (eq_true_of_decide (Eq.refl true))
@[simp]
theorem lt_zero_iff (n : WithBot ℕ) : n < 0 ↔ n = ⊥ := by
 refine' Option.casesOn n _ _
 exact of_eq_true (eq_true_of_decide (Eq.refl true))
 

Proof state:
case refine'_2
n : WithBot ℕ
⊢ ∀ (val : ℕ), some val < 0 ↔ some val = ⊥

Next tactic:
intro n
@[simp]
theorem lt_zero_iff (n : WithBot ℕ) : n < 0 ↔ n = ⊥ := by
 refine' Option.casesOn n _ _
 exact of_eq_true (eq_true_of_decide (Eq.refl true))
 intro n
 

Proof state:
case refine'_2
n✝ : WithBot ℕ
n : ℕ
⊢ some n < 0 ↔ some n = ⊥

Next tactic:
refine' ⟨fun h => _, fun h => _⟩
@[simp]
theorem lt_zero_iff (n : WithBot ℕ) : n < 0 ↔ n = ⊥ := by
 refine' Option.casesOn n _ _
 exact of_eq_true (eq_true_of_decide (Eq.refl true))
 intro n
 refine' ⟨fun h => _, fun h => _⟩
 

Proof state:
case refine'_2.refine'_1
n✝ : WithBot ℕ
n : ℕ
h : some n < 0
⊢ some n = ⊥
case refine'_2.refine'_2 n✝ : WithBot ℕ n : ℕ h : some n = ⊥ ⊢ some n < 0

Next tactic:
exfalso
@[simp]
theorem lt_zero_iff (n : WithBot ℕ) : n < 0 ↔ n = ⊥ := by
 refine' Option.casesOn n _ _
 exact of_eq_true (eq_true_of_decide (Eq.refl true))
 intro n
 refine' ⟨fun h => _, fun h => _⟩
 exfalso
 · 

Proof state:
case refine'_2.refine'_1.h
n✝ : WithBot ℕ
n : ℕ
h : some n < 0
⊢ False

Next tactic:
rw [WithBot.some_eq_coe] at h
@[simp]
theorem lt_zero_iff (n : WithBot ℕ) : n < 0 ↔ n = ⊥ := by
 refine' Option.casesOn n _ _
 exact of_eq_true (eq_true_of_decide (Eq.refl true))
 intro n
 refine' ⟨fun h => _, fun h => _⟩
 exfalso
 · rw [WithBot.some_eq_coe] at h
   

Proof state:
case refine'_2.refine'_1.h
n✝ : WithBot ℕ
n : ℕ
h : ↑n < 0
⊢ False

Next tactic:
exact not_le_of_lt h WithBot.coe_nonneg
@[simp]
theorem lt_zero_iff (n : WithBot ℕ) : n < 0 ↔ n = ⊥ := by
 refine' Option.casesOn n _ _
 exact of_eq_true (eq_true_of_decide (Eq.refl true))
 intro n
 refine' ⟨fun h => _, fun h => _⟩
 exfalso
 · rw [WithBot.some_eq_coe] at h
   exact not_le_of_lt h WithBot.coe_nonneg
 · 

Proof state:
case refine'_2.refine'_2
n✝ : WithBot ℕ
n : ℕ
h : some n = ⊥
⊢ some n < 0

Next tactic:
rw [h]
@[simp]
theorem lt_zero_iff (n : WithBot ℕ) : n < 0 ↔ n = ⊥ := by
 refine' Option.casesOn n _ _
 exact of_eq_true (eq_true_of_decide (Eq.refl true))
 intro n
 refine' ⟨fun h => _, fun h => _⟩
 exfalso
 · rw [WithBot.some_eq_coe] at h
   exact not_le_of_lt h WithBot.coe_nonneg
 · rw [h]
   

Proof state:
case refine'_2.refine'_2
n✝ : WithBot ℕ
n : ℕ
h : some n = ⊥
⊢ ⊥ < 0

Next tactic:
exact of_eq_true (eq_true_of_decide (Eq.refl true))
theorem one_le_iff_zero_lt {x : WithBot ℕ} : 1 ≤ x ↔ 0 < x := by
  

Proof state:
x : WithBot ℕ
⊢ 1 ≤ x ↔ 0 < x

Next tactic:
refine' ⟨fun h => lt_of_lt_of_le (WithBot.coe_lt_coe.mpr zero_lt_one) h, fun h => _⟩
theorem one_le_iff_zero_lt {x : WithBot ℕ} : 1 ≤ x ↔ 0 < x := by
  refine' ⟨fun h => lt_of_lt_of_le (WithBot.coe_lt_coe.mpr zero_lt_one) h, fun h => _⟩
  

Proof state:
x : WithBot ℕ
h : 0 < x
⊢ 1 ≤ x

Next tactic:
induction x using WithBot.recBotCoe
theorem one_le_iff_zero_lt {x : WithBot ℕ} : 1 ≤ x ↔ 0 < x := by
  refine' ⟨fun h => lt_of_lt_of_le (WithBot.coe_lt_coe.mpr zero_lt_one) h, fun h => _⟩
  induction x using WithBot.recBotCoe
  · 

Proof state:
case bot
h : 0 < ⊥
⊢ 1 ≤ ⊥

Next tactic:
exact (not_lt_bot h).elim
theorem one_le_iff_zero_lt {x : WithBot ℕ} : 1 ≤ x ↔ 0 < x := by
  refine' ⟨fun h => lt_of_lt_of_le (WithBot.coe_lt_coe.mpr zero_lt_one) h, fun h => _⟩
  induction x using WithBot.recBotCoe
  · exact (not_lt_bot h).elim
  · 

Proof state:
case coe
a✝ : ℕ
h : 0 < ↑a✝
⊢ 1 ≤ ↑a✝

Next tactic:
exact WithBot.coe_le_coe.mpr (Nat.succ_le_iff.mpr (WithBot.coe_lt_coe.mp h))
theorem lt_one_iff_le_zero {x : WithBot ℕ} : x < 1 ↔ x ≤ 0 :=
  not_iff_not.mp (by 

Proof state:
x : WithBot ℕ
⊢ ¬x < 1 ↔ ¬x ≤ 0

Next tactic:
simpa using one_le_iff_zero_lt
theorem add_one_le_of_lt {n m : WithBot ℕ} (h : n < m) : n + 1 ≤ m := by
  

Proof state:
n m : WithBot ℕ
h : n < m
⊢ n + 1 ≤ m

Next tactic:
cases n
theorem add_one_le_of_lt {n m : WithBot ℕ} (h : n < m) : n + 1 ≤ m := by
  cases n
  · 

Proof state:
case none
m : WithBot ℕ
h : none < m
⊢ none + 1 ≤ m

Next tactic:
exact bot_le
theorem add_one_le_of_lt {n m : WithBot ℕ} (h : n < m) : n + 1 ≤ m := by
  cases n
  · exact bot_le
  

Proof state:
case some
m : WithBot ℕ
val✝ : ℕ
h : some val✝ < m
⊢ some val✝ + 1 ≤ m

Next tactic:
cases m
theorem add_one_le_of_lt {n m : WithBot ℕ} (h : n < m) : n + 1 ≤ m := by
  cases n
  · exact bot_le
  cases m
  

Proof state:
case some.none
val✝ : ℕ
h : some val✝ < none
⊢ some val✝ + 1 ≤ none
case some.some val✝¹ val✝ : ℕ h : some val✝¹ < some val✝ ⊢ some val✝¹ + 1 ≤ some val✝

Next tactic:
exacts [(not_lt_bot h).elim, WithBot.some_le_some.2 (WithBot.some_lt_some.1 h)]
/-- For an Abelian Lie algebra, the weights of any Lie module are linear. -/
instance instLinearWeightsOfIsLieAbelian [IsLieAbelian L] [NoZeroSMulDivisors R M] :
    LinearWeights R L M :=
  have aux : ∀ (χ : L → R), weightSpace M χ ≠ ⊥ → ∀ (x y : L), χ (x + y) = χ x + χ y := by
    

Proof state:
R : Type u_1
L : Type u_2
M : Type u_3
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : LieRingModule L M
inst✝² : LieModule R L M
inst✝¹ : IsLieAbelian L
inst✝ : NoZeroSMulDivisors R M
⊢ ∀ (χ : L → R), weightSpace M χ ≠ ⊥ → ∀ (x y : L), χ (x + y) = χ x + χ y

Next tactic:
have h : ∀ x y, Commute (toEndomorphism R L M x) (toEndomorphism R L M y) := fun x y ↦ by
      rw [commute_iff_lie_eq, ← LieHom.map_lie, trivial_lie_zero, LieHom.map_zero]
/-- For an Abelian Lie algebra, the weights of any Lie module are linear. -/
instance instLinearWeightsOfIsLieAbelian [IsLieAbelian L] [NoZeroSMulDivisors R M] :
    LinearWeights R L M :=
  have aux : ∀ (χ : L → R), weightSpace M χ ≠ ⊥ → ∀ (x y : L), χ (x + y) = χ x + χ y := by
    have h : ∀ x y, Commute (toEndomorphism R L M x) (toEndomorphism R L M y) := fun x y ↦ by
      

Proof state:
R : Type u_1
L : Type u_2
M : Type u_3
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : LieRingModule L M
inst✝² : LieModule R L M
inst✝¹ : IsLieAbelian L
inst✝ : NoZeroSMulDivisors R M
x y : L
⊢ Commute ((toEndomorphism R L M) x) ((toEndomorphism R L M) y)

Next tactic:
rw [commute_iff_lie_eq, ← LieHom.map_lie, trivial_lie_zero, LieHom.map_zero]