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

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

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

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

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

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