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

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

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

State before:
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m : ℕ
x✝ : n ≤ step m
d : ℕ
h✝ : n + d ≃ step m
⊢ n ≤ m ∨ n ≃ step m
Tactic:
let motive := λ x => d ≃ x → n ≤ m ∨ n ≃ step m
State after:
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m : ℕ
x✝ : n ≤ step m
d : ℕ
h✝ : n + d ≃ step m
motive : ℕ → Prop := fun x => d ≃ x → n ≤ m ∨ n ≃ step m
⊢ n ≤ m ∨ n ≃ step m

State before:
case x
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m : ℕ
x✝ : n ≤ step m
d : ℕ
h✝ : n + d ≃ step m
motive : ℕ → Prop := fun x => d ≃ x → n ≤ m ∨ n ≃ step m
⊢ motive 0
Tactic:
intro (_ : d ≃ 0)
State after:
case x
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m : ℕ
x✝¹ : n ≤ step m
d : ℕ
h✝ : n + d ≃ step m
motive : ℕ → Prop := fun x => d ≃ x → n ≤ m ∨ n ≃ step m
x✝ : d ≃ 0
⊢ n ≤ m ∨ n ≃ step m

State before:
case x
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m : ℕ
x✝¹ : n ≤ step m
d : ℕ
h✝ : n + d ≃ step m
motive : ℕ → Prop := fun x => d ≃ x → n ≤ m ∨ n ≃ step m
x✝ : d ≃ 0
⊢ n ≤ m ∨ n ≃ step m
Tactic:
apply Or.inr
State after:
case x.h
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m : ℕ
x✝¹ : n ≤ step m
d : ℕ
h✝ : n + d ≃ step m
motive : ℕ → Prop := fun x => d ≃ x → n ≤ m ∨ n ≃ step m
x✝ : d ≃ 0
⊢ n ≃ step m

State before:
case x.h
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m : ℕ
x✝¹ : n ≤ step m
d : ℕ
h✝ : n + d ≃ step m
motive : ℕ → Prop := fun x => d ≃ x → n ≤ m ∨ n ≃ step m
x✝ : d ≃ 0
⊢ n ≃ step m
Tactic:
calc
  n      ≃ _ := Rel.symm add_zero
  n + 0  ≃ _ := AA.substR (Rel.symm ‹d ≃ 0›)
  n + d  ≃ _ := ‹n + d ≃ step m›
  step m ≃ _ := Rel.refl
State after:
no goals

State before:
case x
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m : ℕ
x✝ : n ≤ step m
d : ℕ
h✝ : n + d ≃ step m
motive : ℕ → Prop := fun x => d ≃ x → n ≤ m ∨ n ≃ step m
⊢ ∀ (m : ℕ), motive (step m)
Tactic:
intro e (_ : d ≃ step e)
State after:
case x
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m : ℕ
x✝¹ : n ≤ step m
d : ℕ
h✝ : n + d ≃ step m
motive : ℕ → Prop := fun x => d ≃ x → n ≤ m ∨ n ≃ step m
e : ℕ
x✝ : d ≃ step e
⊢ n ≤ m ∨ n ≃ step m

State before:
case x
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m : ℕ
x✝¹ : n ≤ step m
d : ℕ
h✝ : n + d ≃ step m
motive : ℕ → Prop := fun x => d ≃ x → n ≤ m ∨ n ≃ step m
e : ℕ
x✝ : d ≃ step e
⊢ n ≤ m ∨ n ≃ step m
Tactic:
apply Or.inl
State after:
case x.h
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m : ℕ
x✝¹ : n ≤ step m
d : ℕ
h✝ : n + d ≃ step m
motive : ℕ → Prop := fun x => d ≃ x → n ≤ m ∨ n ≃ step m
e : ℕ
x✝ : d ≃ step e
⊢ n ≤ m

State before:
case x.h
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m : ℕ
x✝¹ : n ≤ step m
d : ℕ
h✝ : n + d ≃ step m
motive : ℕ → Prop := fun x => d ≃ x → n ≤ m ∨ n ≃ step m
e : ℕ
x✝ : d ≃ step e
⊢ n ≤ m
Tactic:
apply le_defn.mpr
State after:
case x.h
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m : ℕ
x✝¹ : n ≤ step m
d : ℕ
h✝ : n + d ≃ step m
motive : ℕ → Prop := fun x => d ≃ x → n ≤ m ∨ n ≃ step m
e : ℕ
x✝ : d ≃ step e
⊢ ∃ k, n + k ≃ m

State before:
case x.h
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m : ℕ
x✝¹ : n ≤ step m
d : ℕ
h✝ : n + d ≃ step m
motive : ℕ → Prop := fun x => d ≃ x → n ≤ m ∨ n ≃ step m
e : ℕ
x✝ : d ≃ step e
⊢ ∃ k, n + k ≃ m
Tactic:
exists e
State after:
case x.h
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m : ℕ
x✝¹ : n ≤ step m
d : ℕ
h✝ : n + d ≃ step m
motive : ℕ → Prop := fun x => d ≃ x → n ≤ m ∨ n ≃ step m
e : ℕ
x✝ : d ≃ step e
⊢ n + e ≃ m

State before:
case x.h
ℕ : Type
inst✝³ : Core ℕ
inst✝² : Induction ℕ
inst✝¹ : Addition ℕ
inst✝ : Sign ℕ
order_inst : Order ℕ
n m : ℕ
x✝¹ : n ≤ step m
d : ℕ
h✝ : n + d ≃ step m
motive : ℕ → Prop := fun x => d ≃ x → n ≤ m ∨ n ≃ step m
e : ℕ
x✝ : d ≃ step e
⊢ step (n + e) ≃ step m
Tactic:
calc
  step (n + e) ≃ _ := Rel.symm add_step
  n + step e   ≃ _ := AA.substR (Rel.symm ‹d ≃ step e›)
  n + d        ≃ _ := ‹n + d ≃ step m›
  step m       ≃ _ := Rel.refl
State after:
no goals