Theorem: Lean4Axiomatic.Natural.le_cancel_add (Lean4Axiomatic/Natural/Order.lean)

State before:
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m₁ m₂ : ℕ
⊢ n + m₁ ≤ n + m₂ → m₁ ≤ m₂
Tactic:
intro (_ : n + m₁ ≤ n + m₂)
State after:
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m₁ m₂ : ℕ
x✝ : n + m₁ ≤ n + m₂
⊢ m₁ ≤ m₂

State before:
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m₁ m₂ : ℕ
x✝ : n + m₁ ≤ n + m₂
⊢ m₁ ≤ m₂
Tactic:
have ⟨d, (_ : (n + m₁) + d ≃ n + m₂)⟩ := le_defn.mp ‹n + m₁ ≤ n + m₂›
State after:
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m₁ m₂ : ℕ
x✝ : n + m₁ ≤ n + m₂
d : ℕ
h✝ : n + m₁ + d ≃ n + m₂
⊢ m₁ ≤ m₂

State before:
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m₁ m₂ : ℕ
x✝ : n + m₁ ≤ n + m₂
d : ℕ
h✝ : n + m₁ + d ≃ n + m₂
⊢ m₁ ≤ m₂
Tactic:
apply le_defn.mpr
State after:
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m₁ m₂ : ℕ
x✝ : n + m₁ ≤ n + m₂
d : ℕ
h✝ : n + m₁ + d ≃ n + m₂
⊢ ∃ k, m₁ + k ≃ m₂

State before:
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m₁ m₂ : ℕ
x✝ : n + m₁ ≤ n + m₂
d : ℕ
h✝ : n + m₁ + d ≃ n + m₂
⊢ ∃ k, m₁ + k ≃ m₂
Tactic:
exists d
State after:
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m₁ m₂ : ℕ
x✝ : n + m₁ ≤ n + m₂
d : ℕ
h✝ : n + m₁ + d ≃ n + m₂
⊢ m₁ + d ≃ m₂

State before:
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m₁ m₂ : ℕ
x✝ : n + m₁ ≤ n + m₂
d : ℕ
h✝ : n + m₁ + d ≃ n + m₂
⊢ m₁ + d ≃ m₂
Tactic:
have : n + (m₁ + d) ≃ n + m₂ := calc
  n + (m₁ + d) ≃ _ := Rel.symm AA.assoc
  (n + m₁) + d ≃ _ := ‹(n + m₁) + d ≃ n + m₂›
  n + m₂       ≃ _ := Rel.refl
State after:
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m₁ m₂ : ℕ
x✝ : n + m₁ ≤ n + m₂
d : ℕ
h✝ : n + m₁ + d ≃ n + m₂
this : n + (m₁ + d) ≃ n + m₂
⊢ m₁ + d ≃ m₂

State before:
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m₁ m₂ : ℕ
x✝ : n + m₁ ≤ n + m₂
d : ℕ
h✝ : n + m₁ + d ≃ n + m₂
this : n + (m₁ + d) ≃ n + m₂
⊢ m₁ + d ≃ m₂
Tactic:
exact AA.cancelL ‹n + (m₁ + d) ≃ n + m₂›
State after:
no goals